.class public Ldata/SecrahgoodsAdapter;
.super Landroid/widget/BaseAdapter;
.source "SecrahgoodsAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Ldata/SecrahgoodsAdapter$Holder;
    }
.end annotation


# instance fields
.field private c:Landroid/content/Context;

.field private id:Ljava/lang/String;

.field private listbean:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/GoodsBean;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 0
    .param p1, "c"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lbean/GoodsBean;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 31
    .local p2, "listbean":Ljava/util/List;, "Ljava/util/List<Lbean/GoodsBean;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 32
    iput-object p1, p0, Ldata/SecrahgoodsAdapter;->c:Landroid/content/Context;

    .line 33
    iput-object p2, p0, Ldata/SecrahgoodsAdapter;->listbean:Ljava/util/List;

    .line 34
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 46
    iget-object v0, p0, Ldata/SecrahgoodsAdapter;->listbean:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .param p1, "arg0"    # I

    .prologue
    .line 51
    const/4 v0, 0x0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .param p1, "arg0"    # I

    .prologue
    .line 56
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getList()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lbean/GoodsBean;",
            ">;"
        }
    .end annotation

    .prologue
    .line 36
    iget-object v0, p0, Ldata/SecrahgoodsAdapter;->listbean:Ljava/util/List;

    return-object v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 7
    .param p1, "arg0"    # I
    .param p2, "view"    # Landroid/view/View;
    .param p3, "arg2"    # Landroid/view/ViewGroup;

    .prologue
    .line 65
    if-nez p2, :cond_0

    .line 66
    new-instance v2, Ldata/SecrahgoodsAdapter$Holder;

    invoke-direct {v2, p0}, Ldata/SecrahgoodsAdapter$Holder;-><init>(Ldata/SecrahgoodsAdapter;)V

    .line 67
    .local v2, "holder":Ldata/SecrahgoodsAdapter$Holder;
    iget-object v4, p0, Ldata/SecrahgoodsAdapter;->c:Landroid/content/Context;

    invoke-static {v4}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v4

    const v5, 0x7f030092

    const/4 v6, 0x0

    invoke-virtual {v4, v5, v6}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 68
    const v4, 0x7f0c0061

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    iput-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->name:Landroid/widget/TextView;

    .line 69
    const v4, 0x7f0c02a7

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    iput-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->sell:Landroid/widget/TextView;

    .line 70
    const v4, 0x7f0c0294

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    iput-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->cost:Landroid/widget/TextView;

    .line 71
    const v4, 0x7f0c02e1

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    iput-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->instro:Landroid/widget/TextView;

    .line 72
    const v4, 0x7f0c0283

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/ImageView;

    iput-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->iv:Landroid/widget/ImageView;

    .line 73
    const v4, 0x7f0c02e0

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/Button;

    iput-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->bt:Landroid/widget/Button;

    .line 74
    invoke-virtual {p2, v2}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 80
    :goto_0
    iget-object v4, p0, Ldata/SecrahgoodsAdapter;->listbean:Ljava/util/List;

    invoke-interface {v4, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lbean/GoodsBean;

    .line 81
    .local v0, "bean":Lbean/GoodsBean;
    iget-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->name:Landroid/widget/TextView;

    invoke-virtual {v0}, Lbean/GoodsBean;->getname()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 82
    iget-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->sell:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "\u9500\u91cf"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lbean/GoodsBean;->getsellcount()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 83
    iget-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->cost:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Lbean/GoodsBean;->getcost()F

    move-result v6

    invoke-static {v6}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 84
    iget-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->instro:Landroid/widget/TextView;

    invoke-virtual {v0}, Lbean/GoodsBean;->getInstro()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 85
    invoke-virtual {v0}, Lbean/GoodsBean;->getShopid()Ljava/lang/String;

    move-result-object v4

    iput-object v4, p0, Ldata/SecrahgoodsAdapter;->id:Ljava/lang/String;

    .line 86
    iget-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->bt:Landroid/widget/Button;

    iget-object v5, p0, Ldata/SecrahgoodsAdapter;->id:Ljava/lang/String;

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setTag(Ljava/lang/Object;)V

    .line 87
    iget-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->bt:Landroid/widget/Button;

    new-instance v5, Ldata/SecrahgoodsAdapter$1;

    invoke-direct {v5, p0}, Ldata/SecrahgoodsAdapter$1;-><init>(Ldata/SecrahgoodsAdapter;)V

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 102
    new-instance v3, LPlugclass/ImageLoader;

    iget-object v4, p0, Ldata/SecrahgoodsAdapter;->c:Landroid/content/Context;

    invoke-direct {v3, v4}, LPlugclass/ImageLoader;-><init>(Landroid/content/Context;)V

    .line 103
    .local v3, "imageLoader":LPlugclass/ImageLoader;
    invoke-virtual {v0}, Lbean/GoodsBean;->getimg()Ljava/lang/String;

    move-result-object v1

    .line 104
    .local v1, "checkurl":Ljava/lang/String;
    iget-object v4, v2, Ldata/SecrahgoodsAdapter$Holder;->iv:Landroid/widget/ImageView;

    invoke-virtual {v3, v1, v4}, LPlugclass/ImageLoader;->DisplayImage(Ljava/lang/String;Landroid/widget/ImageView;)V

    .line 105
    return-object p2

    .line 76
    .end local v0    # "bean":Lbean/GoodsBean;
    .end local v1    # "checkurl":Ljava/lang/String;
    .end local v2    # "holder":Ldata/SecrahgoodsAdapter$Holder;
    .end local v3    # "imageLoader":LPlugclass/ImageLoader;
    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ldata/SecrahgoodsAdapter$Holder;

    .restart local v2    # "holder":Ldata/SecrahgoodsAdapter$Holder;
    goto :goto_0
.end method

.method public setList(Ljava/util/List;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lbean/GoodsBean;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 40
    .local p1, "listbean":Ljava/util/List;, "Ljava/util/List<Lbean/GoodsBean;>;"
    iput-object p1, p0, Ldata/SecrahgoodsAdapter;->listbean:Ljava/util/List;

    .line 41
    return-void
.end method
